import java.lang.*;
import java.util.*;

public class doudizhu1 {
	public static void main(String args[]) {
		int i=0;
		int b= (int)(Math.random()*(2-1+1)+1);     //抽地主
		switch(b) {	
        case 1: int nongming[];         //若为1，则为农民
		int jishu[];
		jishu = new int[15];    //计数，每种牌不得超过4张
	        nongming = new int[17];	
		System.out.println("你是农民，奋起抵抗吧！");
		while(i<17){//发牌阶段
		nongming[i] = (int)(Math.random()*(15-1+1)+1);
		int js = nongming[i];
	//	jishu[js]++;//计数不得超过4张
	//	if(jishu[js]>4) continue;
		i++;
		}
                Arrays.sort(nongming);//对牌进行排序
		for(i=16;i>=0;i--) {
		int a = nongming[i];
                if(a<=10) System.out.print(a+" ");
                else if(a==11) System.out.print("J ");
                else if(a==12) System.out.print("Q ");
                else if(a==13) System.out.print("K ");
                else if(a==14) System.out.print("小王 ");
                else if(a==15) System.out.print("大王 ");
                }
		System.out.print("\n");
		break;
      case 2 :  int dizhu[];
                dizhu = new int[21];
		System.out.println("你是地主，疯狂压榨吧！");
                while(i<21){
                dizhu[i] = (int)(Math.random()*(15-1+1)+1);
                i++;
                }
                Arrays.sort(dizhu);
                for(i=20;i>=0;i--) {
                int a = dizhu[i];
                if(a<=10) System.out.print(a+" ");
                else if(a==11) System.out.print("J ");
                else if(a==12) System.out.print("Q ");
                else if(a==13) System.out.print("K ");
                else if(a==14) System.out.print("小王 ");
                else if(a==15) System.out.print("大王 ");
                }
		System.out.print("\n");
		break;
		}
	}
}
